//
//  WRSegmentControl.h
//  WindRunner
//
//  Created by leeqb on 10/6/14.
//  Copyright (c) 2014 poweropt. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol WRSegmentControlDelegate <NSObject>

- (void)segmentChanged:(NSInteger)selectedIndex;

@end

@interface WRSegmentControl : UIView
{
    NSMutableArray *_segItems;
    NSInteger _prevSelectedIndex;
}

@property (nonatomic, assign) id<WRSegmentControlDelegate> delegate;
@property (nonatomic, assign) NSInteger selectedIndex;

- (id)initWithItems:(NSArray *)items selectedIndex:(NSInteger)selectedIndex;
- (void)setSelectedIndex:(NSInteger)selectedIndex;

@end
